package b面向对象.day3.demo1_作业;

public class Point {
    int x;
    int y;

    public Point(int x, int y) {
        this.x = x;
        this.y = y;
    }
    public double distance(Point other){
//        this:x,y
//        other:x,y
        double x=this.x-other.x;
        double y=this.y-other.y;
        x=Math.pow(x,2);
        y=Math.pow(y,2);
        return Math.pow(x+y,0.5);
    }
}
